<h1>Listing tasks</h1>


	<table border=1>
	  <tr>
	    <th>Title</th>
	    <th>Description</th>
	    <th>Goal</th>
	    <th>Patient</th>
	    <th>Team</th>
			<th>Active</th>
	  </tr>

	<% @tasks.each do |task| %>
	  <tr>
	    <td><%=h task.title %></td>
	    <td><%=h task.description %></td>
	    <td><%=h task.goal.title if task.goal!=0%></td>
	    <td><%=h task.patient%></td>
	    <td><%=h task.team %></td>
			<td><%=h task.active %></td>	
     <td><%= link_to 'Show', task %></td>
     <td><%= link_to 'Edit', edit_task_path(task) %></td>
     <td><%= link_to 'Destroy', task, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New task', new_task_path %>